package com.vlin.entity.mode;

public class DeviceMode {

	private final int type;
	private final String name;
	
	public DeviceMode(int mode, String name) {
		this.type = mode;
		this.name = name;
	}
	
	public int getType() {
		return this.type;
	}
	
	public String getName() {
		return this.name;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + type;
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		DeviceMode other = (DeviceMode) obj;
		if (name == null) {
			if (other.name != null)
				return false;
		} else if (!name.equals(other.name))
			return false;
		if (type != other.type)
			return false;
		return true;
	}

}
